import i18n from '@/common/lang'

export const columns = [
  {
    label: i18n.t('shipment.form.deliveryNoteNumber'),
    width: 'auto',
    prop: 'number',
    fixed: true
  },
  {
    label: i18n.t('shipment.form.dateIssuance'),
    width: 'auto',
    prop: 'deliveryDate'
  },
  {
    label: i18n.t('shipment.form.arrivalDate'),
    prop: 'arrivalDate',
    width: 'auto'
  },
  {
    label: i18n.t('shipment.form.deliveryMethod'),
    prop: 'deliveryMethod',
    width: 'auto'
  },
  // {
  //   label: i18n.t('shipment.column.deliveryQuantity'),
  //   prop: 'deliveryQuantity',
  //   width: 120
  // },
  {
    label: '创建日期',
    prop: 'createTime',
    width: 'auto'
  },
  {
    label: '状态',
    prop: 'state',
    width: 100
  }
]
export const actions = [
  {
    key: 'edit',
    text: i18n.t('common.edit'),
    permissions:'srm:deliveryNote:edit'
  },
  {
    key: 'detail',
    text: i18n.t('common.detail'),
    permissions:'srm:deliveryNote:detail'
  },
  {
    key: 'cancel',
    text: i18n.t('common.cancel'),
    permissions:'srm:deliveryNote:cancel'
  }
]

export const detailColumns = [
  {
    label: i18n.t('shipment.form.purchaseOrderNumber'),
    minWidth: 150,
    prop: 'orderNumber',
    fixed: true
  },
  // {
  //   label: i18n.t('shipment.column.orderLineNumber'),
  //   minWidth: 150,
  //   prop: 'lineNumber',
  //   fixed: true
  // },
  {
    label: i18n.t('shipment.column.materialCode'),
    minWidth: 120,
    prop: 'materialCode'
  },
  {
    label: i18n.t('shipment.column.materialName'),
    width: 150,
    prop: 'materialName'
  },
  {
    label: i18n.t('shipment.column.materialSpecs'),
    minWidth: 120,
    prop: 'materialSpecs'
  },
  {
    label: i18n.t('shipment.column.materialType'),
    minWidth: 120,
    prop: 'materialType'
  },
  {
    label: i18n.t('shipment.column.quantity'),
    minWidth: 120,
    prop: 'quantity'
  },
  {
    label: i18n.t('shipment.column.materialUnit'),
    minWidth: 100,
    prop: 'materialUnit'
  },
  // 期望交货日期
  {
    label: i18n.t('shipment.column.expectedDeliveryDate'),
    minWidth: 160,
    prop: 'deliveryDate'
  },
  {
    label: i18n.t('shipment.column.deliveryQuantity'),
    width: 150,
    prop: 'deliveryQuantity'
  },
  {
    label: i18n.t('shipment.column.addrName'),
    width: 150,
    prop: 'addrName'
  },
  {
    label: i18n.t('shipment.column.address'),
    width: 150,
    prop: 'address'
  },

  {
    label: i18n.t('shipment.column.contacts'),
    width: 150,
    prop: 'contacts'
  },
  {
    label: i18n.t('shipment.column.contactsPhone'),
    width: 150,
    prop: 'contactsPhone'
  }
]
